$(document).ready(function () {
    selectDate("startDate",0);
    selectDate("endDate",0);
    search();
});
function  search(){
    var params = {
        "LogContext": $("#message").val(),
        "BeginDate": $("#txtBeginDate").val(),
        "EndDate": $("#txtEndDate").val()
    };
    $.post("getLogMessage",params,function (result) {
        if (result.state == "Success") {

            var LogContent = $("#LogContent");
            LogContent.empty();
            var list = result.logList;

            if(list.length > 0){
                $("#LogContent").show();
                $("#NoContent").hide();
            }else{
                $("#LogContent").hide();
                $("#NoContent").show();
            }

            for(var i in list){
                LogContent.append(
                    '<div class="form-group" style="margin-top:20px"><div class="col-sm-10 partCondition">'+timeStamp2String(list[i].date)+'</div></div>'+
                    '<div class="partTable partTableLog"><p id="upgradeLog'+i+'" style="color: #666;float:left">'+list[i].logContext+'</p></div>');
            }
        } else {
            showMessage(result.message);
        }
    })
}